package com.eastfair.auth.hystrix;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.eastfair.auth.api.AuthServiceFeign;
import com.eastfair.auth.api.UserAccountServiceFeign;
import com.eastfair.auth.dto.*;
import com.eastfair.auth.entity.Organization;
import com.eastfair.auth.entity.UserAccount;
import com.eastfair.auth.entity.UserOrganization;
import com.eastfair.auth.vo.ResourceOrganizationVo;
import com.eastfair.auth.vo.RoleVo;
import com.eastfair.auth.vo.UserAccountVo;
import com.eastfair.boot.request.PageParams;
import com.eastfair.core.base.R;
import com.eastfair.el.ElParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * 用户API熔断
 *
 * @author zuihou
 * @date 2019/07/23
 */
@Slf4j
@Component
public class UserAccountApiFallback implements UserAccountServiceFeign {
    @Override
    public R<UserAccount> get(Long userId) {
        return R.timeout();
    }

    @Override
    public R<String> getName(Long userId) {
        return R.timeout();
    }

    @Override
    public R<List<UserAccountVo>> querySimpleByIds(UserAccountDto userAccountDto) {
        return R.timeout();
    }

    @Override
    public R<UserAccountVo> addAdminUser(UserAccountDto userAccountDto) {
        return R.timeout();
    }


    @Override
    public R<UserAccount> queryOfPhoneOrEmail(String mobile, String email) {
        return R.timeout();
    }

    @Override
    public R<UserAccountVo> register(UserAccountDto userAccountDto) {
        return R.timeout();
    }

    @Override
    public R<String> test() {
        return R.timeout();
    }

    @Override
    public R<UserAccountVo> initRole(UserAccountDto userAccountDto) {
        return R.timeout();
    }

    @Override
    public R<Boolean> isPermission(Long userId, String[] permission, String[] classPermission) {
        return R.timeout();
    }


    @Override
    public R<Boolean> updateCorrelationById(UserAccountDto userAccountDto) {
        return R.timeout();
    }

    @Override
    public R<UserAccountVo> saveCompanyUser(UserAccountDto userAccountDto) {
        return R.timeout();
    }

    @Override
    public R<Boolean> updateById(UserAccountDto userAccountDto) {
        return R.timeout();
    }

    @Override
    public R<UserAccountVo> findSimpleById(Long userId) {
        return R.timeout();
    }

    @Override
    public R<List<String>> getPermissionOfUserId(ElParam elParam) {
        return R.timeout();
    }


    @Override
    public R<List<RoleVo>> getRoleOfUserId(Long userId) {
        return R.timeout();
    }

    @Override
    public R<UserAccountVo> registerSubSystemUser(UserAccountDto userAccountDto) {
        return R.timeout();
    }

    @Override
    public R<IPage<UserAccountVo>> pageVo(PageParams<UserAccountDto> params) {
        return R.timeout();
    }

    @Override
    public R<List<Long>> queryIds(UserAccountDto userAccountDto) {
        return R.timeout();
    }

    @Override
    public R<Map<Long, String>> queryMobiles(UserAccountDto userAccountDto) {
        return R.timeout();
    }

    @Override
    public R registerServiceProvider(RegisterDTO registerDTO) {
        return R.timeout();
    }

    @Override
    public R<String> getToken(UserAccountDto userAccountDto) {
        return R.timeout();
    }

    @Override
    public R<List<UserAccountVo>> findAllLeaderUserOfOrg(OrganizationDTO organizationDto) {
        return R.timeout();
    }

    @Override
    public R<List<String>> getPermissionOfUserId(Long userId) {
        return R.timeout();
    }

    @Override
    public R loadUserInterface(Long userId) {
        return R.timeout();
    }


}
